package io;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.ObjectOutputStream;

public class OOSDemo {
    public static void main(String[] args) throws IOException {
        String name = "范传奇";
        int age = 18;
        String gender = "男";
        String [] otherInto = {"眼睛小","黑","和王克晶老师是同事"};
        Person person = new Person(name,gender,age,otherInto);
        System.out.println(person);
        FileOutputStream fos = new FileOutputStream("person.obj");
        ObjectOutputStream oos = new ObjectOutputStream(fos);
        oos.writeObject(person);
        System.out.println("写出完毕!");
        oos.close();

    }
}
